home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / WWW / Perl_WWW_Utilities / total / animation / README < prev   
Encoding:
Text File  |  1996-01-01  |  6.2 KB  |  151 lines

  1. # Animation Script for the WWW
  2. # Created by Matt Wright
  3. # Written on: 9/28/95   Last Modified on: 11/21/95
  4. # Version 1.2
  5. # I can be reached at:  mattw@misha.net
  6. # Scripts found at:     http://www.worldwidemart.com/scripts/
  7. ##############################################################################
  8. # If you run into any problems while trying to configure this scripts, help
  9. # is available.  The steps you should take to get the fastest results, are:
  10. #    1) Read this file thoroughly
  11. #    2) Consult the Matt's Script Archive Frequently Asked Questions:
  12. #        http://www.worldwidemart.com/scripts/faq/
  13. #    3) If you are still having difficulty installing this script, send
  14. #       e-mail to: scripts-help@tahoenet.com
  15. #       Include any error messages you are receiving and as much detail
  16. #       as you can so we can spot your problem.  Also include the variable
  17. #       configuration block that is located at the top of the script.
  18. #
  19. # Hopefully we will be able to help you solve your problems.  Thank you.
  20. ##############################################################################
  21.  
  22. This script allows you to implement animations in-lined into your HTML pages.  
  23. It uses the idea of server push, where images are pushed down by the server to 
  24. the client one after the other, which creates the look of an animation.  There 
  25. is not much to this script and it should not be hard to install onto your 
  26. system.  You will need to have Perl installed on your system and have access 
  27. to execute CGI scripts either through a cgi-bin or a .cgi extension.  Check 
  28. with your system administrator to see if they allows either of these.
  29.  
  30. There are two files included with this script:
  31.         1) README - This file; includes detailed installation instructions.
  32.         2) nph-anim.pl - The Perl script which generates the headers and 
  33.                           pushes your images to the client.
  34.  
  35. The only file that needs to be edited for this script to work is the 
  36. nph-anim.pl script.  Below is a set of instructions for setting it up 
  37. on your system.
  38.  
  39. NPH-ANIM.PL -
  40.  
  41.         There are three variables that must be set in this script for it to 
  42. work correctly:
  43.  
  44. $times = "1";
  45.  
  46.         This is the number of times you want the script to cycle through your 
  47. entire animation.  Most of the time this will be set to "1", but you may wish 
  48. for it to loop several times.
  49.  
  50. $basefile = "/path/to/images/";
  51.  
  52.         This is the base filename where all of your images are kept.  When the 
  53. script chooses the images, the filenames from @files are appended to this to 
  54. form a complete path to the image.  Realize that this path must be an absolute 
  55. path on the system and should not be relative to the WWW pages.
  56.  
  57. @files = ("begin.gif","second.gif","third.gif","last.gif");
  58.  
  59.         These are the filenames, put into an array separated by commas, that 
  60. will be appended to $basefile.  Put the images in the order that you want the 
  61. animation sequence to run, with the first image as the first element of the 
  62. array and the last image of the animation as your last element of the array.
  63.  
  64. $con_type = "gif";
  65.  
  66.     This should be set to the type of image you are planning on 
  67. sending to the browser.  Values can be one of the following:
  68.        VALUE           IMAGE EXTENSION
  69.     gif                      gif
  70.     jpeg                     jpeg jpg jpe
  71.     ief                      ief
  72.     tiff                     tiff tif
  73.     x-cmu-raster             ras
  74.     x-portable-anymap        pnm
  75.     x-portable-bitmap        pbm
  76.     x-portable-graymap       pgm
  77.     x-portable-pixmap        ppm
  78.     x-rgb                    rgb
  79.     x-xbitmap                xbm
  80.     x-xpixmap                xpm
  81.     x-xwindowdump            xwd
  82.  
  83. For instance, if you want to use a jpg image, you would put in 'jpeg' for 
  84. this variable.  Use the values on the right in this variable, and you can 
  85. identify the proper values by looking at the extension on your image and 
  86. then looking for it in the right column and trace it over to the value in 
  87. the left.  Keep in mind that not all of the values will display in all 
  88. browsers.
  89.  
  90. _____________________________________________________________
  91.  
  92. Calling your animation from your HTML file.
  93.  
  94. Calling this animation script is as easy as in-lining an image.  If your 
  95. animation script is located at the url:
  96.  
  97. http://your.host.xxx/cgi-bin/nph-anim.pl
  98.  
  99. Then you would call the animation simply by doing:
  100.  
  101. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl">
  102.  
  103. Any other attribute to the image or animation can be added as normal, such as 
  104. align, border, alt, etc... so that it would look like:
  105.  
  106. <img src="http://your.host.xxx/cgi-bin/nph-anim.pl" align=left border=0 
  107.          alt="Animation!">
  108. ___________________________________________________________________________
  109.  
  110. FAQ:
  111.  
  112. Can I change the name of nph-anim.pl?  Why does it have nph- in front of it?
  113.  
  114. Good question.  If you change the name of the script from nph-anim.pl to 
  115. something without nph- on the front of it, you will need to comment out 
  116. the line:
  117.  
  118. print "HTTP/1.0 200 OK\n";
  119.  
  120. The nph- means non-parsed header file, which makes the server execute it 
  121. instead of parsing the script.
  122.  
  123. You may also want to try commenting out the line if the script is giving 
  124. you problems.
  125. _________________________________________________________________________
  126. HISTORY
  127.    Version 1.0    - 9/18/95    - First Version Released
  128.    Version 1.1  - 11/4/95    - Version 1.1 Released with a minor fix 
  129.                   explaining the nph- and header outputs.
  130.    Version 1.2  - 11/21/95    - A small fix, suggested by Robert Wood 
  131.                   <wood@nexen.com> helped improve the 
  132.                   buffering of the output of the images.
  133. _________________________________________________________________________
  134.  
  135. This script is provided as is and comes with no warranties, expressed or 
  136. implied.  It was written to be useful and fun, so by all means, enjoy it!  You 
  137. have permission to edit/modify/whatever this script and I ask only two things 
  138. in return:
  139.  
  140. 1) If you implement it on a page, please let me know the URL of where it is 
  141.    implemented so I can see my work
  142.  
  143. and
  144.  
  145. 2) Please keep my name and url in the script itself somewhere, and if you 
  146. would like you could even add it to your page, but that is not necessary.
  147.  
  148. If you have any questions, let me know and I will try and help!
  149. ____________________________________________________________________________
  150. Matt Wright - mattw@misha.net - http://www.worldwidemart.com/scripts/
  151.